package com.gg.user.controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;

import com.gg.user.service.UserService;

import base.BaseServlet;

@WebServlet("/user/VerifyEmailServlet")
public class VerifyEmailServlet extends BaseServlet {
	@Autowired
	private  UserService    userService ; 
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		//1， 获取请求参数
		String   email   = request.getParameter("email");
		boolean  res =  userService.verifyEmail(email);
		response.setContentType("application/json;charset=utf-8");
		response.getWriter().print(res);
	}
}
